package com.luoyx.hauyne.tracelog.service.impl;


import com.luoyx.hauyne.mybatisplus.service.impl.BaseServiceImpl;
import com.luoyx.hauyne.tracelog.api.request.OperationLogDTO;
import com.luoyx.hauyne.tracelog.converter.OperationLogConverter;
import com.luoyx.hauyne.tracelog.entity.OperationLog;
import com.luoyx.hauyne.tracelog.mapper.OperationLogMapper;
import com.luoyx.hauyne.tracelog.service.OperationLogService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 操作日志 服务实现类
 * </p>
 *
 * @author 1564469545@qq.com
 * @since 2024-09-13
 */
@Service
@RequiredArgsConstructor
public class OperationLogServiceImpl extends BaseServiceImpl<OperationLogMapper, OperationLog>
        implements OperationLogService {

    private final OperationLogConverter operationLogConverter;

    /**
     * 创建操作日志
     *
     * @param operationLogDTO 操作日志DTO
     */
    @Override
    public void create(OperationLogDTO operationLogDTO) {
        baseMapper.insert(operationLogConverter.toEntity(operationLogDTO));
    }
}
